<?php

namespace App\Providers;

use App\Services\IAreaService;
use App\Services\IArticleService;
use App\Services\ICacheService;
use App\Services\ICookieService;
use App\Services\ICouponService;
use App\Services\IEvaluateService;
use App\Services\IFinanceService;
use App\Services\IManagerService;
use App\Services\IMasterLogService;
use App\Services\IMasterService;
use App\Services\IMerchantLogService;
use App\Services\IMerchantService;
use App\Services\IMobileService;
use App\Services\Impl\AreaServiceImpl;
use App\Services\Impl\ArticleServiceImpl;
use App\Services\Impl\CacheServiceImpl;
use App\Services\Impl\CookieServiceImpl;
use App\Services\Impl\CouponServiceImpl;
use App\Services\Impl\EvaluateServiceImpl;
use App\Services\Impl\FinanceServiceImpl;
use App\Services\Impl\ManagerServiceImpl;
use App\Services\Impl\MasterLogServiceImpl;
use App\Services\Impl\MasterServiceImpl;
use App\Services\Impl\MerchantLogServiceImpl;
use App\Services\Impl\MerchantServiceImpl;
use App\Services\Impl\MobileServiceImpl;
use App\Services\Impl\OrderServiceImpl;
use App\Services\Impl\PayServiceImpl;
use App\Services\Impl\QiniuStorageServiceImpl;
use App\Services\Impl\RefundServiceImpl;
use App\Services\Impl\SessionServiceImpl;
use App\Services\Impl\StatisticServiceImpl;
use App\Services\Impl\SystemServiceImpl;
use App\Services\Impl\SystemTaskServiceImpl;
use App\Services\Impl\WalletServiceImpl;
use App\Services\IOrderService;
use App\Services\IPayService;
use App\Services\IRefundService;
use App\Services\ISessionService;
use App\Services\IStatisticService;
use App\Services\IStorageService;
use App\Services\ISystemService;
use App\Services\ISystemTaskService;
use App\Services\IWalletService;
use Illuminate\Support\ServiceProvider;

class ProjectServiceProvider extends ServiceProvider
{
    /**
     * Bootstrap the application services.
     *
     * @return void
     */
    public function boot()
    {
        //
    }

    /**
     * Register the application services.
     *
     * @return void
     */
    public function register()
    {
        /**
         * 订单服务
         */
        $this->app->singleton(IOrderService::class, OrderServiceImpl::class);
        $this->app->singleton(IRefundService::class, RefundServiceImpl::class);
        $this->app->singleton(ICouponService::class, CouponServiceImpl::class);
        /**
         * 系统服务
         */
        $this->app->singleton(IAreaService::class, AreaServiceImpl::class);
        $this->app->singleton(ISystemService::class, SystemServiceImpl::class);
        $this->app->singleton(ISystemTaskService::class, SystemTaskServiceImpl::class);
        $this->app->singleton(ISessionService::class, SessionServiceImpl::class);
        $this->app->singleton(ICookieService::class, CookieServiceImpl::class);
        $this->app->singleton(IMobileService::class, MobileServiceImpl::class);
        $this->app->singleton(IPayService::class, PayServiceImpl::class);
        $this->app->singleton(IStorageService::class, QiniuStorageServiceImpl::class);
        $this->app->singleton(ICacheService::class, CacheServiceImpl::class);
        $this->app->singleton(IArticleService::class, ArticleServiceImpl::class);

        /**
         * 用户服务
         */
        $this->app->singleton(IManagerService::class, ManagerServiceImpl::class);
        $this->app->singleton(IMerchantService::class, MerchantServiceImpl::class);
        $this->app->singleton(IMasterService::class, MasterServiceImpl::class);
        $this->app->singleton(IWalletService::class, WalletServiceImpl::class);
        $this->app->singleton(IFinanceService::class, FinanceServiceImpl::class);
        /**
         * 流水记录统计服务
         */
        $this->app->singleton(IStatisticService::class, StatisticServiceImpl::class);
        $this->app->singleton(IMasterLogService::class, MasterLogServiceImpl::class);
        $this->app->singleton(IMerchantLogService::class, MerchantLogServiceImpl::class);

        /**
         * 自动评价
         */
        $this->app->singleton(IEvaluateService::class,EvaluateServiceImpl::class);

    }
}
